namespace SmartMathLibrary
{
    /// <summary>
    /// Interface to implement a GeneralVector class.
    /// </summary>
    public interface IGeneralVector
    {
        /// <summary>
        /// Gets or sets the <see cref="System.Double"/> value of the vector at the specified index.
        /// </summary>
        /// <value>The component of the vector at the specified position.</value>
        double this[int index] { get; set; }

        /// <summary>
        /// Gets or sets the vector componentdatas.
        /// </summary>
        /// <value>The vector componentdatas.</value>
        double[] VectorData { get; set; }

        /// <summary>
        /// Counts the components of the vector.
        /// </summary>
        /// <value>The number of components of the vector.</value>
        int Count { get; }

        /// <summary>
        /// Creates the sign inverted vector of the current instance.
        /// </summary>
        /// <returns>The sign inverted vector of the current instance.</returns>
        GeneralVector CreateSignInvertedVector();

        /// <summary>
        /// Copies this instance.
        /// </summary>
        /// <returns>The current instance of the vector.</returns>
        GeneralVector Copy();

        /// <summary>
        /// Gets the component value.
        /// </summary>
        /// <param name="index">The index of the component.</param>
        /// <returns>The vectorcomponent value at the over given index</returns>
        double GetComponent(int index);

        /// <summary>
        /// Sets the component value at a specified position.
        /// </summary>
        /// <param name="index">The index of the component.</param>
        /// <param name="value">The new value of the component.</param>
        void SetComponent(int index, double value);

        /// <summary>
        /// Gets the length of the vector.
        /// </summary>
        /// <value>The length of the vector.</value>
        double Length { get; }

        /// <summary>
        /// Normalizes the current vector.
        /// </summary>
        void Normalize();

        /// <summary>
        /// Determines whether the current vector is orthogonal to the specified vector.
        /// </summary>
        /// <param name="value">The specified vector to check.</param>
        /// <returns>
        /// True if current vector is orthogonal to the specified vector otherwise, false.
        /// </returns>
        bool IsOrthogonalTo(GeneralVector value);

        /// <summary>
        /// Converts the current instance of the vector to a row matrix.
        /// </summary>
        /// <returns>The converted matrix.</returns>
        Matrix ToMatrix();

        /// <summary>
        /// Converts the data of the vector to an array of numeric values.
        /// </summary>
        /// <returns>An array of numeric values.</returns>
        double[] ToArray();
    }
}